<include file="Common:header"/>
<body>
	<div class="top-wrap">
		<div class="top-btn-group">
			<a href="<{:U('Home/User/withdraw')}>" class="top-btn">
				提现
			</a>
		</div>
		<div class="title-bg"><if condition="!empty($username)"><{$username}><else/>我的</if>账户</div>
	</div>
	<div class="main-wrap">
		<div class="top-border-box">		
			<div class="account-line">余额：<{$cantx_commission}>元</div>
			<div class="account-line">总收入： <{$totalCommission}> 元</div>
			<div class="account-line">已提现金额：<{$ytx_commission}> 元</div>
			<div class="account-line no_border">申请提现中金额：<{$sqtx_commission}> 元</div>
		</div>
		<div class="commission-title">佣金记录：</div>
		<div class="baner_list">
			<foreach name="list" item="value">
				<a class="wwwehn" href="javascript:void(0)" style="background-color:#DDDDDD;border-bottom:0px;margin-bottom:5px;">
					<p align="left">
					<span><{$value['content']}></span></p>
	                <p align="right"><font color="#b3b3b3"><{:date("Y-m-d H:i:s",$value['createtime'])}></font></p>
				</a>
			</foreach>
			<div id="loadding" style="text-align: center; display: none;"><img src="__PUBLIC__/js/layer/skin/default/loading-0.gif" /></div>
		</div>
	</div>
<input type="hidden" id="page" value="1">
<include file="Common:menu"/>
</body>
</html>
<script>
$(function(){
	$(window).scroll(function () {
		if($(window).scrollTop()>=($(document).height()-$(window).height())){
			ajax_more();
		}
	});
});

//加载文章
function ajax_more(){
	var loadObj = $('#loadding');
	var page = $('#page').val();
	if(page == '-1'){
		return false;
	}
	loadObj.show();
	$.ajax({
		type: "POST",
		url: "<{:U('Home/User/account')}>",
		data: "page="+page,
		dataType:'json',
		success: function(msg){
			if(msg.status == '1'){
				var html = '';
				for(var i  in  msg.data){
					html +="<a class='wwwehn' href='javascript:void(0)' style='background-color:#DDDDDD;border-bottom:0px;margin-bottom:5px;'>";
					html +="<p align='left'>";
					html +="<span>"+msg.data[i].content+"</span></p>";
                    html +="<p align='right'><font color='#b3b3b3'>";
					html +=""+msg.data[i].createtime+"</font></p>";
                    html +="</a>";
				}
				page = parseInt(page) + 1;
				$('#page').val(page);
				$('#loadding').before(html);
				loadObj.hide();
			}else{
				$('#page').val('-1');
				loadObj.hide();
			}
		}
	});
}

</script>